<?php
ini_set("display_errors", 1);
error_reporting(7);

 require_once('Zend/Amf/Server.php');
 require_once('Zend/Session.php');
 require_once('org/flexupload/service/UploadService.php');
 
$server = new Zend_Amf_Server();

Zend_Session::start();
$server->setSession();

$server->setClass("UploadService");
Zend_Amf_Parse_TypeLoader::$classMap['org.flexupload.model.FileInfo'] = "FileInfo";
Zend_Amf_Parse_TypeLoader::$classMap['org.flexupload.model.ServerReply'] = "ServerReply";
Zend_Amf_Parse_TypeLoader::$classMap['org.flexupload.model.FilePart'] = "FilePart";

echo $server->handle();